3.6.85 \(\int \frac {(a B+b B \cos (c+d x)) \sec ^{\frac {3}{2}}(c+d x)}{a+b \cos (c+d x)} \, dx\) [585]

Optimal. Leaf size=60 \[ -\frac {2 B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 B \sqrt {\sec (c+d x)} \sin (c+d x)}{d} \]

[Out]

2*B*sin(d*x+c)*sec(d*x+c)^(1/2)/d-2*B*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/
2*c),2^(1/2))*cos(d*x+c)^(1/2)*sec(d*x+c)^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {21, 3853, 3856, 2719} \begin {gather*} \frac {2 B \sin (c+d x) \sqrt {\sec (c+d x)}}{d}-\frac {2 B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a*B + b*B*Cos[c + d*x])*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x]),x]

[Out]

(-2*B*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (2*B*Sqrt[Sec[c + d*x]]*Sin[c + d*x
])/d

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3856

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rubi steps

\begin {align*} \int \frac {(a B+b B \cos (c+d x)) \sec ^{\frac {3}{2}}(c+d x)}{a+b \cos (c+d x)} \, dx &=B \int \sec ^{\frac {3}{2}}(c+d x) \, dx\\ &=\frac {2 B \sqrt {\sec (c+d x)} \sin (c+d x)}{d}-B \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx\\ &=\frac {2 B \sqrt {\sec (c+d x)} \sin (c+d x)}{d}-\left (B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx\\ &=-\frac {2 B \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {2 B \sqrt {\sec (c+d x)} \sin (c+d x)}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 46, normalized size = 0.77 \begin {gather*} \frac {2 B \sqrt {\sec (c+d x)} \left (-\sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+\sin (c+d x)\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a*B + b*B*Cos[c + d*x])*Sec[c + d*x]^(3/2))/(a + b*Cos[c + d*x]),x]

[Out]

(2*B*Sqrt[Sec[c + d*x]]*(-(Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]) + Sin[c + d*x]))/d

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(182\) vs. \(2(80)=160\).
time = 0.30, size = 183, normalized size = 3.05

method result size
default \(-\frac {2 B \left (-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, \sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \EllipticE \left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{\sqrt {-2 \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}\, \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {2 \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-1}\, d}\) \(183\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*B+b*B*cos(d*x+c))*sec(d*x+c)^(3/2)/(a+b*cos(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

-2*B*(-2*cos(1/2*d*x+1/2*c)*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*sin(1/2*d*x+1/2*c)^2+(sin(1/2
*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*Ell
ipticE(cos(1/2*d*x+1/2*c),2^(1/2)))/(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/sin(1/2*d*x+1/2*c)/(2
*cos(1/2*d*x+1/2*c)^2-1)^(1/2)/d

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)^(3/2)/(a+b*cos(d*x+c)),x, algorithm="maxima")

[Out]

integrate((B*b*cos(d*x + c) + B*a)*sec(d*x + c)^(3/2)/(b*cos(d*x + c) + a), x)

________________________________________________________________________________________

Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order 4.
time = 0.10, size = 76, normalized size = 1.27 \begin {gather*} \frac {-i \, \sqrt {2} B {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + i \, \sqrt {2} B {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + \frac {2 \, B \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)^(3/2)/(a+b*cos(d*x+c)),x, algorithm="fricas")

[Out]

(-I*sqrt(2)*B*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) + I*sqrt(2)*B*
weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))) + 2*B*sin(d*x + c)/sqrt(cos(
d*x + c)))/d

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} B \int \sec ^{\frac {3}{2}}{\left (c + d x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)**(3/2)/(a+b*cos(d*x+c)),x)

[Out]

B*Integral(sec(c + d*x)**(3/2), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*B+b*B*cos(d*x+c))*sec(d*x+c)^(3/2)/(a+b*cos(d*x+c)),x, algorithm="giac")

[Out]

integrate((B*b*cos(d*x + c) + B*a)*sec(d*x + c)^(3/2)/(b*cos(d*x + c) + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}\,\left (B\,a+B\,b\,\cos \left (c+d\,x\right )\right )}{a+b\,\cos \left (c+d\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((1/cos(c + d*x))^(3/2)*(B*a + B*b*cos(c + d*x)))/(a + b*cos(c + d*x)),x)

[Out]

int(((1/cos(c + d*x))^(3/2)*(B*a + B*b*cos(c + d*x)))/(a + b*cos(c + d*x)), x)

________________________________________________________________________________________